<template>
  <div>
    <el-input v-bind="$attrs"
              placeholder="请输入账号"
              v-on="$listeners"
              @input="handleInput"><i slot="suffix"
         style="font-style: normal; margin-right: 10px">@{{ tenantAlias }}</i></el-input>
    <span class="span_tips">只能包含大小写字母、数字以及特殊字符（~！@#￥%^&*-_），5-20个字符</span>
  </div>
</template>

<script>
export default {
  name: "Account",
  data () {
    return {
      userInfo: sessionStorage.getItem('userInfo')
    }
  },
  computed: {
    user () {
      return JSON.parse(this.userInfo)
    },
    tenantAlias () {
      return this.user?.tenantAlias
    }
  },
  methods: {
    handleInput (value) {
      this.$emit("handleInput", value);
    }
  }
};
</script>

<style scoped>
.span_tips {
  font-size: 12px;
  color: var(--prev-border-color-lightgrey);
}
</style>
